home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1988 April / 1988-04.d64 / keyclick 64 (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  1KB  |  32 lines

  1. 10 rem copyright 1988 compute! publications, inc. - all rights reserved
  2. 20 a=679:v=655:t=64:z=6238:c=0:ifpeek(65530)<>5then40
  3. 30 (NULL)15:a=2816:v=828:t=68:z=6473:c=2
  4. 40 print"[147][144]   copyright 1988 compute! pub., inc."
  5. 50 printtab(11)"all rights reserved"
  6. 60 fori=1tot:readb:x=x+b:next:ifx<>zthenprint"data statement error.":stop
  7. 70 restore:fori=54272to54296:pokei,0:next:rem clear sid
  8. 80 fori=54272to54296:readk:pokei,k:next:rem setup sid chip
  9. 90 fori=0tot-26:readk:pokea+i,k:next
  10. 100 rem choose sound and patch voice selection into ml routine
  11. 110 print"[147]select sound: ":print"  computer":print"  typewriter"
  12. 120 print"  dramatic":input"selection";s$:s$=left$(s$,1)
  13. 130 ifs$<>"c"ands$<>"t"ands$<>"d"then110
  14. 140 ifs$="c"thens1=4:s2=4:b=64
  15. 150 ifs$="t"thens1=11:s2=11:b=128
  16. 160 ifs$="d"thens1=11:s2=18:b=128
  17. 170 a=a+c:pokea+20,s1:pokea+25,s1:pokea+31,s2:pokea+36,s2
  18. 180 pokea+18,b:pokea+29,b:pokea+23,b+1:pokea+34,b+1:a=a-c
  19. 190 rem splice into keyboard vector
  20. 200 ah=int(a/256):al=a-256*ah:pokev,al:pokev+1,ah
  21. 210 rem sid register contents
  22. 220 data 0,28,0,4,64,19,0
  23. 230 data 0,255,0,0,128,19,0
  24. 240 data 0,32,0,12,128,11,0
  25. 250 data 0,50,245,47
  26. 300 rem 64 machine language routine
  27. 310 data 165,198,72,32,72,235,104,197
  28. 320 data 198,240,16,165,197,201,1,240
  29. 330 data 11,169,128,141,11,212,169,129
  30. 340 data 141,11,212,96,169,128,141,18
  31. 350 data 212,169,129,141,18,212,96
  32.